<template>
	<view class="master">
		<template v-for="(item,index) in list">
			<view class="item">
				<view class="left">
					<view class="text1">{{item.memo}}</view>
					<view class="text2">
						<uni-dateformat :date="item.create_time*1000" format="yyyy-MM-dd hh:mm:ss">
						</uni-dateformat>
					</view>
				</view>
				<view class="right">
					+{{item.amount}}
				</view>
			</view>

		</template>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					"amount": "-1088.00",
					"type": "usdt",
					"memo": "参与共创",
					"create_time": 1690276516,
					"freeze_end_time": 0
				}],
				page: 1,
				
			};
		},
		onLoad() {
			this.page =1
			this.list.length =0
		  this.getList()
		},
		methods: {
			getList() {
				var data = {
					account_type: 'site',
					page: this.page
				}
				var that = this
				this.api.http.requests('accountlog/lists', data, res => {
					if (res.data && res.data.length > 0) {
						that.list = that.list.concat(res.data)
					}
				}, "POST")
			}
		},
		onReachBottom() {
			this.page = this.page + 1
			this.getList()
		}
	}
</script>

<style scoped lang="less">
	.item {
		padding: 20px;

		border-bottom: 1rpx solid #ECECEC;
		font-size: 28rpx;
		font-weight: 800;
		color: #3A3A3A;

		display: flex;
		justify-content: space-between;
		align-items: center;

		.left {
			.text2 {
				font-size: 25rpx;
				font-weight: 400;
				color: #666666;
				margin-top: 10px;
			}
		}

		.right {
			font-size: 35rpx;
			font-weight: 800;
			color: #FE903D;
		}
	}
</style>